function default = bkwmodel()
% bkwmodel  Default options for bkwmodel class.
%
% Backend IRIS function.
% No help provided.

% -IRIS Toolbox.
% -Copyright (c) 2007-2014 IRIS Solutions Team.

%**************************************************************************

default = struct();

default.bkwmodel = { ...
   'assign',[],@(x) isempty(x) || isstruct(x), ...
   'saveas','',@ischar, ...
};

default.estimate = { ...
   'cov','auto', @(x) isequal(x,'auto') || isnumeric(x), ...
   'cross',true,@(x) is.logicalscalar(x) ...
      || (is.numericscalar(x) && x >= 0 && x <= 1), ...
   'logdeta',true,@is.logicalscalar, ...
   'display','iter',@(x) is.anychar(x,{'off','none','final','iter'}), ...
   'exclude',{},@(x) isempty(x) || iscellstr(x) || ischar(x), ...
   'filter',{},@(x) isempty(x) || (iscell(x) && iscellstr(x(1:2:end))), ...
   'niter',1,@is.numericscalar, ...
   'maxiter',1000,@is.numericscalar, ...
   'maxfunevals',5000,@is.numericscalar, ...
   'nanresid',NaN,@is.numericscalar, ...
   'optimset',[],@(x) isempty(x) || isstruct(x) || (iscell(x) && iscellstr(x(1:2:end))), ...
   'relative',true,@is.logicalscalar, ...
   'report',Inf,@is.numericscalar, ...
   'tolx',1e-10,@is.numericscalar, ...
   'tolfun',1e-10,@is.numericscalar, ...
};

default.filter = { ...
   'display','off',@(x) is.anychar(x,{'none','off','final','iter'}), ...
   'maxiter',10, @(x) is.numericscalar(x) && x >= 0 && x == round(x), ...
   'maxfunevals',1000, @(x) is.numericscalar(x) && x >= 0 && x == round(x), ...
   'tolx',1e-10, @(x) is.numericscalar(x) && x > 0, ...
   'tolfun',1e-10, @(x) is.numericscalar(x) && x > 0, ...
   'optimset',[],@(x) isempty(x) || isstruct(x), ...
};

default.simulate = { ...
   'deviation',false,@is.logicalscalar, ...
   'display','off',@(x) is.anychar(x,{'none','off','final','iter'}), ...
   'enbloc',false,@is.logicalscalar, ...
   'esttime',false,@is.logicalscalar, ...
   'maxiter',1000,@is.numericscalar, ...
   'maxfunevals',1000,@is.numericscalar, ...
   'ndraw',1,@(x) is.numericscalar(x) && x >= 1 && x == round(x), ...
   'optimset',[],@(x) isempty(x) || isstruct(x) || (iscell(x) && iscellstr(x(1:2:end))), ...
   'plan',[],@(x) isempty(x) || isa(x,'plan'), ...
   'progress',false,@is.logicalscalar, ...
   'residuals,residual','data',@(x) isequal(x,'data') || is.func(x), ...
   'solver','lsqnonlin',@(x) is.anychar(x,{'lsqnonlin','fsolve'}), ...
   'tolx',1e-10,@is.numericscalar, ...
   'tolfun',1e-10,@is.numericscalar, ...
};

end